﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<%@ Import Namespace="YoProgramo.Infrastructure.Tools.PagedList"%>
<%@ Import Namespace="YoProgramo.Domain.BusinessLogic.Extensions"%>
<%@ Import Namespace="YoProgramo.Domain.Core.Interfaces"%>

    <%
      var s = (IPagedList<IUser>)ViewData.Model;                       
    %>
       
    <div class="userList">          
      <%foreach (IUser user in s) { 
          %>    
        <div class="userListBox">
          <%= Html.Gravatar(user.Email, new { s = "32", r = "pg" }, new { @class = "FotoUsuario FotoUserList", alt = "Foto" })%>          
          <p><%= Html.RouteLink(user.UserName.Substring(0, user.UserName.Length > 16 ? 16 : user.UserName.Length), "Default", new { action = "ViewProfile", controller = "User", id = user.Id }, new { title = user.UserName })%></p>
          <p><%= (long)user.GetReputation() %></p>
        </div>                       
        <%} %>               
    </div>        
    
    <%= Html.Paging<IUser>(s, ViewData["UrlPaging"] as string, "__PAGENUM__")%>

